package com.example.ex5_springboot.services;

import com.example.ex5_springboot.mappers.UserLoginMapper;
import com.example.ex5_springboot.pojo.UserLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserLoginServiceImpl implements UserLoginService{
    @Autowired
    private UserLoginMapper userLoginMapper;

    @Override
    public UserLogin getUserInfoById(int id) {
        return userLoginMapper.getUserInfoById(id);
    }

    @Override
    public List<UserLogin> getUserInfo() {
        return userLoginMapper.getUserInfo();
    }

    @Override
    public int changeEnable(int enable, int id) {
        return userLoginMapper.changeEnable(enable,id);
    }

    @Override
    public int editUserChangeInfo(int id, String college, String name) {
        return userLoginMapper.editUserChangeInfo(id,college,name);
    }

    @Override
    public int insertUser(int id, String college, String name) {
        return userLoginMapper.insertUser(id,college,name);
    }

    @Override
    public int updateUser(int id, String petName, String user_pwd) {
        return userLoginMapper.updateUser(id,petName,user_pwd);
    }
}
